{include file="public/header" /}
<link rel="stylesheet" href="/static/index/css/page/search.css">
<style>
    body {
        background-color: var(--themeColor);
    }

    .main {

        .pro-vss {
            margin-top: 1.3rem;
        }
    }
</style>
<body>
<div class="main ">
    <div class="search-vss ">
        <div class="flex items-center justify-between container">
            <i class="layui-icon layui-icon-left mr-30" lay-event="jump" lay-url="back"></i>
            <div class="search flex items-center justify-between flex-1">
                <img src="/static/index/images/index/ic_searchgray@2x.png" alt="" class="icon"/>
                <input class="inp keyword flex-auto" type="text" placeholder="请输入关键字" value="{$keyword??''}"/>
                <button class="search-btn" lay-click="search">搜索</button>
            </div>
        </div>
    </div>
    <div class="m-30 pro-vss">
        <div class="tpl_list"></div>
    </div>
</div>

</body>
{include file="public/footer"/}
{include file="public/template/product_card" query="$query" /}
<script>
    layui.use(['methods', 'listen'], function () {
        var a = layui.jquery, m = layui.methods, ly = layui.layer;

        m.getFlowData('{:url("product/getList")}?{:urldecode($query)}');

        m.event.click('search', function (data, that) {
            var keyword = a(".keyword").val();
            if (!keyword) {
                ly.msg('请填写要搜索的内容');
                return false;
            }
            m.getFlowData('{:url("product/getList")}?keyword=' + keyword);
        });


    });
</script>
</html>